<template>
  <div>
    <div class="info" v-for="(item, i) in listData" :key="i">
      <div class="flex align-items-center">
        <img :src="item.logo_img_image" alt="" />
        <div class="name">{{ item.name }}</div>
      </div>
      <div class="operation">
        <span class="mr-1" @click="edit(item.id)"><i class="iconfont icon-fontclass-xiugai"></i> </span>
        <span @click="del_enterprise(item, i)"><i class="iconfont icon-fontclass-shanchu"></i> </span>
      </div>
    </div>
    <yz-blank :datas="listData"></yz-blank>
  </div>
</template>
<script>
import mixins from "../mixin.js";
export default {
  mixins: [mixins],
  data() {
    return {
      current_statue: true,
      name: "",
      logo: "",
      httpUrl: "plugin.lawyer-platform.frontend.controllers.business.getBusiness",
    };
  },
  methods: {
    edit(id) {
      this.$router.push(this.fun.getUrl("enterpriseEdit", { id }));
    },
    del_enterprise({ name, id }, i) {
      this.$dialog.confirm({
        title: '删除',
        message: '是否删除' + name,
      }).then(res => {
        $http.post("plugin.lawyer-platform.frontend.controllers.business.delete", { id }).then(({ result, msg }) => {
          if (result) this.listData.splice(i, 1);
          this.$toast(msg);
        })
      })
    }
  }
};
</script>
<style scoped lang="scss">
  @import "./index.scss";
</style>